<template>
  <div class="block">
    <el-dialog
      title="提示"
      :append-to-body='true'
      :visible.sync="requestState"
      :close-on-click-modal = "false"
      width="30%"
      :before-close="handleClose">
      <span>{{ requestErrorInfo }}</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="requestState = false">忽 略</el-button>
        <el-button type="primary" @click="reFreshHtml">刷 新</el-button>
      </span>
    </el-dialog>
    <el-dialog
      v-if="taskSetting.hasFence"
      title="提示"
      :append-to-body='true'
      :visible.sync="autoCreateFenceDialog"
      :close-on-click-modal = "false"
      width="30%"
      :before-close="handleClose">
      <span>当前作业地点与作业区域未关联，是否要创建</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="autoCreateFenceDialog = false">取 消</el-button>
        <el-button type="primary" @click="updateTask3" v-if="updateUserDialog" >创 建</el-button>
        <el-button type="primary" @click="createTask3" v-else>创 建</el-button>
      </span>
    </el-dialog>
    <div style="margin-top: 10px; margin-left: 10px;">
      <el-select clearable multiple v-model="choose_task_type" placeholder="请选择任务类型">
        <!-- <el-option v-if="this.userTaskTypes.includes(1)" label="工务施工" value="1"></el-option>
        <el-option v-if="this.userTaskTypes.includes(3)" label="巡道作业" value="3"></el-option>
        <el-option v-if="this.userTaskTypes.includes(4)" label="列检作业" value="4"></el-option> -->  
        <el-option v-if="userTaskTypes.includes(1)" :label=taskSetting.showInformation.GWShowName value="1"></el-option>
        <el-option v-if="userTaskTypes.includes(2)" :label=taskSetting.showInformation.DWShowName value="2"></el-option>
        <el-option v-if="userTaskTypes.includes(3)" label="巡道作业" value="3"></el-option>
        <el-option v-if="userTaskTypes.includes(4)" label="列检作业" value="4"></el-option>
        <el-option v-if="userTaskTypes.includes(5)" label="其它作业" value="5"></el-option>
        <el-option v-if="userTaskTypes.includes(6)" label="机务作业" value="6"></el-option>
        <el-option v-if="userTaskTypes.includes(7)" label="调车作业" value="7"></el-option>
        <el-option v-if="userTaskTypes.includes(8)" label="商检作业" value="8"></el-option>
      </el-select>
      <el-select clearable multiple v-model="choose_task_state" placeholder="请选择任务状态">
        <el-option label="已批准" value="3"></el-option>
        <el-option label="进行中" value="5"></el-option>
        <el-option v-if="taskSetting.haveEvacuateState" label="撤离中" value="6"></el-option>
        <el-option v-if="!taskSetting.haveEvacuateState" label="已完成" value="6"></el-option>
        <el-option v-if="taskSetting.haveEvacuateState" label="已终止" value="8"></el-option>
      </el-select>
      <el-select clearable v-model="choose_time_type" placeholder="请选择时间类型">
        <el-option label="创建时间" value="createTime"></el-option>
        <el-option label="计划开始时间" value="beginTime_plan"></el-option>
        <el-option label="计划结束时间" value="endTime_plan"></el-option>
        <el-option label="开始时间" value="beginTime"></el-option>
        <el-option label="结束时间" value="endTime"></el-option>
      </el-select>
      <el-date-picker v-model="timeRanges" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
        start-placeholder="请选择查询日期时间"
        end-placeholder="请选择查询日期时间">
      </el-date-picker>
      <el-button type="success" @click="searchEvents2">查询</el-button>
      <div v-if="taskSetting.hasSkyLight" style="display:inline-block; float:right; margin-right:200px">
        <el-date-picker v-model="timeRanges2" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
          start-placeholder="请选择天窗开始时间"
          end-placeholder="请选择天窗结束时间">
        </el-date-picker>
        <el-button type="success" @click="setSkyLight ">设置</el-button>
      </div>
    </div>
    <el-dialog  title="查看作业区域" :visible.sync="openCheckFence">
    <checkfence style="word-break: keep-all;" v-if="openCheckFence" ref="checkfence"/>
    </el-dialog>
    <el-dialog  title="查看作业区域" :visible.sync="openCheckFence_create">
    <checkfence style="word-break: keep-all;"  v-if="openCheckFence_create" ref="checkfence"/>
    </el-dialog>
    <div style="margin-top: 10px; margin-left: 10px;">
      <!-- <el-date-picker v-model="timeRanges" type="datetimerange" start-placeholder="请选择开始日期时间"
        end-placeholder="请选择结束日期时间">
      </el-date-picker>
      <el-select v-model="eventId" placeholder="请选择事件类型" style="width: 400px">
        <el-option v-for="item in eventNames" :key="item.id" :label="item.chinese" :value="item.id">
        </el-option>
      </el-select> -->
      <el-button type="success" @click="searchEvents2">刷新</el-button>
      <!-- <div class="home-title">
          人员实时信息
      </div> -->
      <el-button :disabled="!permission.create" class="filter-item" type="success" @click="resData">新建任务
      </el-button>
    </div>

    <el-alert
    title="请输入时间类型"
    v-if="TimeTypeError"
    type="error"
    center
    @close="TimeTypeError=false"
    show-icon>
    </el-alert>


    <el-alert
    title="请输入时间起止范围"
    type="error"
    v-if="TimeRangeError"
    center
    @close="TimeRangeError=false"
    show-icon>
    </el-alert>


    <el-alert
    title="创建任务成功"
    type="success"
    v-if="createtasksuccess"
    center
    @close="createtasksuccess=false"
    show-icon>
    </el-alert>

    <el-alert
    title="修改任务成功"
    type="success"
    v-if="updatetasksuccess"
    @close="updatetasksuccess=false"
    center
    show-icon>
    </el-alert>

    <el-alert
    title="删除任务成功"
    type="success"
    v-if="deletetasksuccess"
    @close="deletetasksuccess=false"
    center
    show-icon>
    </el-alert>


    <el-alert
    title="创建任务失败"
    type="error"
    v-if="createtaskfailed"
    @close="createtaskfailed=false"
    center
    show-icon>
    </el-alert>

    <el-alert
    title="修改任务失败"
    type="error"
    v-if="updatetaskfailed"
    @close="updatetaskfailed=false"
    center
    show-icon>
    </el-alert>

    <el-alert
    title="删除任务失败"
    type="error"
    v-if="deletetaskfailed"
    @close="deletetaskfailed=false"
    center
    show-icon>
    </el-alert>

    <el-alert
    title="获取任务失败"
    type="error"
    v-if="gettaskfailed"
    @close="gettaskfailed=false"
    center
    show-icon>
    </el-alert>


    <el-alert
    title="只有未开始的任务可以修改"
    type="error"
    v-if="cannotupdatetask"
    @close="cannotupdatetask=false"
    center
    show-icon>
    </el-alert>


    <el-alert
    title="只有未开始的任务可以删除"
    type="error"
    v-if="cannotdeletetask"
    @close="cannotdeletetask=false"
    center
    show-icon>
    </el-alert>


<el-dialog title="查看任务" :visible.sync="checkUserDialog">
  <div v-if="choosed==='check_eight'">
  <el-form :model="form" :disabled="form_two">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="作业地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入作业地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="负责人: ">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: ">
      <el-cascader 
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>
<div v-if="choosed==='check_one'">
  <el-form  :model="form" :disabled="form_one">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约开始时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date3"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约结束时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date4"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date5"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date6"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item v-if="taskSetting.haveEvacuateState" label="终止时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date7"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: ">
      <el-cascader
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <!-- <span style="padding-left: 7%;">备注 </span>  -->   
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <selectfence  v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: ">
      <el-cascader 
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: ">
      <el-cascader 
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: ">
      <el-cascader 
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>
<div v-if="choosed==='check_two'">
  <el-form :model="form" :disabled="form_two">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约开始时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date3"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约结束时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date4"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date5"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date6"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item v-if="taskSetting.haveEvacuateState" label="终止时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date7"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="巡道车站: ">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入巡道地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="巡道内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入巡道内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道工: ">
      <el-cascader 
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>
<div v-if="choosed==='check_three'">
  <el-form :model="form" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约开始时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date3"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约结束时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date4"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date5"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date6"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item v-if="taskSetting.haveEvacuateState" label="终止时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date7"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="列检地点: ">
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="列检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入列检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="列检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入列检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="列检员: ">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>

<div v-if="choosed==='check_four'">
  <el-form  :model="form" :disabled="form_one">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约开始时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date3"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约结束时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date4"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date5"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date6"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item v-if="taskSetting.haveEvacuateState" label="终止时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date7"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: ">
      <el-cascader
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <!-- <span style="padding-left: 7%;">备注 </span>  --> 
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <selectfence  v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: ">
      <el-cascader 
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: ">
      <el-cascader 
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: ">
      <el-cascader 
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>

<div v-if="choosed==='check_five'">
  <el-form :model="form" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约开始时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date3"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="预约结束时间" :label-width="formLabelWidth" v-if="taskSetting.autoTimeControl">
      <el-date-picker
      v-model="ruleForm.date4"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date5"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date6"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item v-if="taskSetting.haveEvacuateState" label="终止时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date7"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="商检地点: ">
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="商检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入商检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="商检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入商检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="商检员: ">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>

<div v-if="choosed==='check_six'">
  <el-form :model="form" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="机务地点: ">
      <el-cascader 
    v-model="ruleForm.area"
    :options="station_lists_1[0]"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="地点备注:   ">
          <el-input type="textarea" :rows="1" placeholder="请输入机务地点备注" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="机务内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入机务内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="机务人员: ">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>
<div v-if="choosed==='check_seven'">
  <el-form :model="form" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="计划开始时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="地点: ">
      <el-cascader 
    v-model="ruleForm.area"
    :options="station_lists_1[0]"
    :props="{ expandTrigger: 'hover',multiple:false }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="地点备注:   ">
          <el-input type="textarea" :rows="1" placeholder="请输入调车地点备注" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="调车内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入调车内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="调车人员: ">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
</div>

</el-dialog>
<el-dialog title="修改任务" :visible.sync="updateTimeDialog" :close-on-click-modal ="false">
  <el-form>
    <el-form-item label="延后结束: ">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="updateTaskTime">修 改</el-button>
  </div>
</el-dialog>
<el-dialog :title="updateTaskOption" :visible.sync="updateUserDialog" :close-on-click-modal ="false">
  <div v-if="choosed==='update_eight'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled=false>
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="计划开始时间" :label-width="formLabelWidth" prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="作业地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入作业地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="负责人: " prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="petrolman">
      <el-cascader 
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
      <el-button v-if="historyEditState" type="primary" @click="createTask2">创 建</el-button>
      <el-button v-else type="primary" @click="updateTask2">修 改</el-button>
  </div>
</div>
<div v-if="choosed==='update_one'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <!-- <el-form-item label="提前开始: ">
      <el-select v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
      <el-button type="success" v-if="aheadTime" @click="aheadTimeUpdate(ruleForm.date1,ruleForm.taskId,aheadTime)">确定</el-button>
    </el-form-item>
    <el-form-item label="延后结束: ">
      <el-select v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select> -->
    <!-- </el-form-item> -->
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: " prop="area" filterable>
      <el-cascader
        style="width:302px"
        :ref="selectArea"
        :disabled="(!permission.update || !permission.update.workArea)"
        v-model="ruleForm.area"
        :options="station_lists_1" :key="resetoptions"
        :props="{ expandTrigger: 'hover',multiple:false }"
        filterable>
      </el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <el-select v-model="KMDirection" placeholder="公里标上下行方向" style="padding-left: 90px;padding-top: 10px">
        <el-option label="不选择" value= 0 ></el-option>
        <el-option label="上行" value="up"></el-option>
        <el-option label="下行" value="down"></el-option>
        <el-option label="上下行" value="updown"></el-option>
      </el-select>
      <!-- <span style="padding-left: 7%;">备注 </span>  -->
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input :disabled="(!permission.update || !permission.update.workContent)" type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item prop="fence" v-if="taskSetting.hasFence" label="作业区域: ">
      <el-input type="textarea"  v-model="ruleForm.fence" :disabled="true" style="width: 10%;height: 80%;"></el-input>
      <el-button :disabled="(!permission.update || !permission.update.fence)" type="primary" @click="selectFenceGenerate(1)" v-if="!taskSetting.hasAreaFence && ((start_kilometer_1 && start_meter_1 && end_kilometer_1 && end_meter_1 && KMDirection!=0)||ruleForm.area[0]==0)&&!fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence">新建</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" type="primary" @click="selectfence" v-if="taskSetting.hasAreaFence && !fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence&&!openSelectArea">新建</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" v-if="fenceid" type="success" @click="checkfence_create(fenceid)">查看</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" v-if="fenceid" type="danger" @click="delectefence()">删除</el-button>
    </el-form-item>
    <el-select v-model="selectfence_way" v-if="openFenceType" placeholder="请选择新建方式" style="margin-bottom:20px">
        <el-option v-if="ruleForm.area[0]==0"  label="按区段生成" value="1"></el-option>
        <el-option label="自由画定" value="2"></el-option>
        <el-option label="按区域生成" value="3"></el-option>
      </el-select>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="choose_select_way">下一步</el-button>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="openFenceType=false">取消</el-button>
      <el-select v-model="selectFenceType" v-if="openSelectTrack" placeholder="请选择围栏类型" style="margin-bottom:20px">
        <el-option label="封闭围栏" value="1"></el-option>
        <el-option label="开放围栏" value="2"></el-option>
      </el-select>
      <!-- <el-button type="success" @click="selectfence_traincheck_create" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button> -->
      <el-button type="success" @click="selectFenceGenerate(1)" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectTrack=false" v-if="openSelectTrack" style="margin-bottom:20px">取消</el-button>
      <el-select v-model="selectFenceArea" v-if="openSelectArea" placeholder="请选择围栏区域" style="margin-bottom:20px">
        <el-option v-for="(item,index) in workAreaFenceMap" :key="index" :label="index" :value="item"></el-option>
      </el-select>
      <el-button type="success" @click="selectfence_fenceArea_create" v-if="openSelectArea&&selectFenceArea" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectArea=false" v-if="openSelectArea" style="margin-bottom:20px">取消</el-button>
    <selectfence style="word-break: keep-all;"   v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: " prop="liaison">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: " prop="safeman">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="worker">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
      <el-button v-if="historyEditState" type="primary" @click="createTask1">创 建</el-button>
      <el-button v-else type="primary" @click="updateTask1">修 改</el-button>
  </div>
</div>
<div v-if="choosed==='update_two'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled=false>
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree" > </el-cascader>
    </el-form-item>
    <el-form-item label="巡道车站: " prop="stationNo">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入巡道地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="巡道内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入巡道内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道工: " prop="petrolman">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
      <el-button v-if="historyEditState" type="primary" @click="createTask2">创 建</el-button>
      <el-button v-else type="primary" @click="updateTask2">修 改</el-button>
  </div>
</div>
<div v-if="choosed==='update_three'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled=false>
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.setStation" label="列检车站: " prop="stationNo">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="列检地点: " prop="area" filterable>
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :disabled="(!permission.update || !permission.update.workArea)"
    :options="station_lists_1"
    :ref="selectArea"
    :key="resetoptions"
    @change="autoCreateFence=true"
    :props="{ expandTrigger: 'hover',multiple:false }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasFence" label="点击生成作业区域: ">
      <el-button type="success" @click="selectFenceGenerate(4)">生成</el-button>
      <el-input type="textarea"  v-model="fenceid" :disabled="true" style="width: 10%;height: 80%;" ></el-input>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="列检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入列检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="列检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入列检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'"  prop="manager">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="列检员: " prop="trainChecker">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button v-if="historyEditState" type="primary" @click="createTask3">创 建</el-button>
    <el-button type="primary" v-else-if="!autoCreateFence" @click="updateTask3">修 改</el-button>
    <el-button type="primary" v-else-if="taskSetting.hasFence" @click="autoCreateFenceDialog=true">修 改</el-button>
    <el-button type="primary" v-else @click="updateTask3">修 改</el-button>
  </div>
</div>

<div v-if="choosed==='update_four'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <!-- <el-form-item label="提前开始: ">
      <el-select v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
      <el-button type="success" v-if="aheadTime" @click="aheadTimeUpdate(ruleForm.date1,ruleForm.taskId,aheadTime)">确定</el-button>
    </el-form-item>
    <el-form-item label="延后结束: ">
      <el-select v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select> -->
    <!-- </el-form-item> -->
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: " prop="area" filterable>
      <el-cascader
        style="width:302px"
        :ref="selectArea"
        :disabled="(!permission.update || !permission.update.workArea)"
        v-model="ruleForm.area"
        :options="station_lists_1" :key="resetoptions"
        :props="{ expandTrigger: 'hover',multiple:false }"
        filterable>
      </el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <el-select v-model="KMDirection" placeholder="公里标上下行方向" style="padding-left: 90px;padding-top: 10px">
        <el-option label="不选择" value= 0 ></el-option>
        <el-option label="上行" value="up"></el-option>
        <el-option label="下行" value="down"></el-option>
        <el-option label="上下行" value="updown"></el-option>
      </el-select>
      <!-- <span style="padding-left: 7%;">备注 </span>  -->
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input :disabled="(!permission.update || !permission.update.workContent)" type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item prop="fence" v-if="taskSetting.hasFence" label="作业区域: ">
      <el-input type="textarea"  v-model="ruleForm.fence" :disabled="true" style="width: 10%;height: 80%;"></el-input>
      <el-button :disabled="(!permission.update || !permission.update.fence)" type="primary" @click="selectFenceGenerate(4)" v-if="!taskSetting.hasAreaFence && ((start_kilometer_1 && start_meter_1 && end_kilometer_1 && end_meter_1 && KMDirection!=0)||ruleForm.area[0]==0)&&!fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence">新建</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" type="primary" @click="selectfence" v-if="taskSetting.hasAreaFence && !fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence&&!openSelectArea">新建</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" v-if="fenceid" type="success" @click="checkfence_create(fenceid)">查看</el-button>
      <el-button :disabled="(!permission.update || !permission.update.fence)" v-if="fenceid" type="danger" @click="delectefence()">删除</el-button>
    </el-form-item>
    <el-select v-model="selectfence_way" v-if="openFenceType" placeholder="请选择新建方式" style="margin-bottom:20px">
        <el-option v-if="ruleForm.area[0]==0"  label="按区段生成" value="1"></el-option>
        <el-option label="自由画定" value="2"></el-option>
        <el-option label="按区域生成" value="3"></el-option>
      </el-select>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="choose_select_way">下一步</el-button>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="openFenceType=false">取消</el-button>
      <el-select v-model="selectFenceType" v-if="openSelectTrack" placeholder="请选择围栏类型" style="margin-bottom:20px">
        <el-option label="封闭围栏" value="1"></el-option>
        <el-option label="开放围栏" value="2"></el-option>
      </el-select>
      <!-- <el-button type="success" @click="selectfence_traincheck_create" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button> -->
      <el-button type="success" @click="selectFenceGenerate(1)" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectTrack=false" v-if="openSelectTrack" style="margin-bottom:20px">取消</el-button>
      <el-select v-model="selectFenceArea" v-if="openSelectArea" placeholder="请选择围栏区域" style="margin-bottom:20px">
        <el-option v-for="(item,index) in workAreaFenceMap" :key="index" :label="index" :value="item"></el-option>
      </el-select>
      <el-button type="success" @click="selectfence_fenceArea_create" v-if="openSelectArea&&selectFenceArea" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectArea=false" v-if="openSelectArea" style="margin-bottom:20px">取消</el-button>
    <selectfence style="word-break: keep-all;"   v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: " prop="liaison">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: " prop="safeman">
      <el-cascader
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="worker">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
      <el-button v-if = "historyEditState" type="primary" @click="createTask1">创 建</el-button>
      <el-button v-else type="primary" @click="updateTask1">修 改</el-button>
  </div>
</div>

<div v-if="choosed==='update_five'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled=false>
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   ">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.setStation" label="商检车站: " prop="stationNo">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="商检地点: " prop="area">
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :disabled="(!permission.update || !permission.update.workArea)"
    :options="station_lists_1"
    :ref="selectArea"
    :key="resetoptions"
    @change="autoCreateFence=true"
    :props="{ expandTrigger: 'hover',multiple:false }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasFence" label="点击生成作业区域: ">
      <el-button type="success" @click="selectFenceGenerate(4)">生成</el-button>
      <el-input type="textarea"  v-model="fenceid" :disabled="true" style="width: 10%;height: 80%;" ></el-input>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="商检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入商检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="商检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入商检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'"  prop="manager">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="商检员: " prop="trainChecker">
      <el-cascader 
      :disabled="(!permission.update || !permission.update.roleSelect)"
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button v-if="historyEditState" type="primary" @click="createTask3">创 建</el-button>
    <el-button type="primary" v-else-if="!autoCreateFence" @click="updateTask3">修 改</el-button>
    <el-button type="primary" v-else-if="taskSetting.hasFence" @click="autoCreateFenceDialog=true">修 改</el-button>
    <el-button type="primary" v-else @click="updateTask3">修 改</el-button>
  </div>
</div>
</el-dialog>

    <el-dialog title="新建任务" :visible.sync="createUserDialog" :close-on-click-modal ="false">
      <div v-if="choosed==='select'">
  <el-form :model="form">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="创建任务" :label-width="formLabelWidth">
      <el-select v-model="form.region" placeholder="请选择任务类型">
        <el-option v-if="userTaskTypes.includes(1)" :label=taskSetting.showInformation.GWShowName value="1"></el-option>
        <el-option v-if="userTaskTypes.includes(3)" label="巡道作业" value="2"></el-option>
        <el-option v-if="userTaskTypes.includes(4)" label="列检作业" value="3"></el-option>
        <el-option v-if="userTaskTypes.includes(2)" :label=taskSetting.showInformation.DWShowName value="4"></el-option>
        <el-option v-if="userTaskTypes.includes(8)" label="商检作业" value="5"></el-option>
        <el-option v-if="userTaskTypes.includes(5)" label="其它作业" value="8"></el-option>
      </el-select>
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="createUserDialog = false">取 消</el-button>
    <el-button type="primary" @click="select_task_type">下一步</el-button>
  </div>
</div>


<div v-if="choosed==='one'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_one">

    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   " prop="taskName">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: " prop="area" filterable>
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover' }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <el-select v-model="KMDirection" placeholder="公里标上下行方向" style="padding-left: 90px;padding-top: 10px">
        <el-option label="不选择" value= 0 ></el-option>
        <el-option label="上行" value="up"></el-option>
        <el-option label="下行" value="down"></el-option>
        <el-option label="上下行" value="updown"></el-option>
      </el-select>
      <!-- <span style="padding-left: 7%;">备注 </span>  -->
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item prop="fence" v-if="taskSetting.hasFence" label="作业区域: ">
      <el-input type="textarea"  v-model="ruleForm.fence" :disabled="true" style="width: 10%;height: 80%;"></el-input>
      <el-button type="primary" @click="selectFenceGenerate(1)" v-if="!taskSetting.hasAreaFence && ((start_kilometer_1 && start_meter_1 && end_kilometer_1 && end_meter_1 && KMDirection!=0)||ruleForm.area[0]==0)&&!fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence">新建</el-button>
      <el-button type="primary" @click="selectfence" v-if="taskSetting.hasAreaFence && !fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence&&!openSelectArea">新建</el-button>
      <el-button v-if="fenceid" type="success" @click="checkfence_create(fenceid)">查看</el-button>
      <el-button v-if="fenceid" type="danger" @click="delectefence()">删除</el-button>
    </el-form-item>

      <el-select v-model="selectfence_way" v-if="openFenceType" placeholder="请选择新建方式" style="margin-bottom:20px">
        <el-option v-if="ruleForm.area[0]==0"  label="按区段生成" value="1"></el-option>
        <el-option label="自由画定" value="2"></el-option>
        <el-option label="按区域生成" value="3"></el-option>
      </el-select>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="choose_select_way">下一步</el-button>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="openFenceType=false">取消</el-button>
      
      <el-select v-model="selectFenceType" v-if="openSelectTrack" placeholder="请选择围栏类型" style="margin-bottom:20px">
        <el-option label="封闭围栏" value="1"></el-option>
        <el-option label="开放围栏" value="2"></el-option>
      </el-select>
      <el-button type="success" @click="selectFenceGenerate(1)" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectTrack=false" v-if="openSelectTrack" style="margin-bottom:20px">取消</el-button>
      <el-select v-model="selectFenceArea" v-if="openSelectArea" placeholder="请选择围栏区域" style="margin-bottom:20px">
        <el-option v-for="(item,index) in workAreaFenceMap" :key="index" :label="index" :value="item"></el-option>
      </el-select>
      <el-button type="success" @click="selectfence_fenceArea_create" v-if="openSelectArea&&selectFenceArea" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectArea=false" v-if="openSelectArea" style="margin-bottom:20px">取消</el-button>
    <selectfence style="word-break: keep-all;"   v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: " prop="liaison">
      <el-cascader 
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: " prop="safeman">
      <el-cascader 
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="worker">
      <el-cascader 
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" @click="createTask1()">完 成</el-button>
  </div>
</div>

<div v-if="choosed==='two'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_two">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   " prop="taskName">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入巡道地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="巡道内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入巡道内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="巡道工: " prop="petrolman">
      <el-cascader 
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" @click="createTask2">完 成</el-button>
  </div>
</div>

<div v-if="choosed==='three'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   " prop="taskName">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="列检地点: "  prop="area" filterable>
      <el-cascader 
    v-model="ruleForm.area"
    style="width:302px"
    :options="station_lists_1"
    :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    @change="autoCreateFence=true"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasFence" label="点击生成作业区域: ">
      <el-button type="success" @click="selectfence_traincheck">生成</el-button>
      <el-input type="textarea"  v-model="fenceid" :disabled="true" style="width: 10%;height: 80%;" ></el-input>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="列检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入列检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="列检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入列检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="列检员: " prop="trainChecker">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" v-if="!autoCreateFence" @click="createTask3">完 成</el-button>
    <el-button type="primary" v-else-if="taskSetting.hasFence" @click="autoCreateFenceDialog=true">完 成</el-button>
    <el-button type="primary" v-else @click="createTask3">完 成</el-button>
  </div>  
</div>

<div v-if="choosed==='four'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_one">

    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   " prop="taskName">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="作业地点: " prop="area" filterable>
      <el-cascader 
      style="width:302px"
    v-model="ruleForm.area"
    :options="station_lists_1" :key="resetoptions"
    :props="{ expandTrigger: 'hover' }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="作业地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输作业地点" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="公里标:">
      <span>开始</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="start_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <span style="padding-left: 60px;">结束</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_kilometer_1"
            style="width: 20%;height: 20%;" />
            <span>公里(K)</span>
      <el-input type="textarea" :rows="1" placeholder="请输入公里标" v-model="end_meter_1"
            style="width: 20%;height: 20%;" />
            <span>米(M)</span>
      <br>
      <el-select v-model="KMDirection" placeholder="公里标上下行方向" style="padding-left: 90px;padding-top: 10px">
        <el-option label="不选择" value= 0 ></el-option>
        <el-option label="上行" value="up"></el-option>
        <el-option label="下行" value="down"></el-option>
        <el-option label="上下行" value="updown"></el-option>
      </el-select>
      <!-- <span style="padding-left: 7%;">备注 </span>  --> 
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="one_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item prop="fence" v-if="taskSetting.hasFence" label="作业区域: ">
      <el-input type="textarea"  v-model="ruleForm.fence" :disabled="true" style="width: 10%;height: 80%;"></el-input>
      <el-button type="primary" @click="selectFenceGenerate(4)" v-if="!taskSetting.hasAreaFence && ((start_kilometer_1 && start_meter_1 && end_kilometer_1 && end_meter_1 && KMDirection!=0)||ruleForm.area[0]==0)&&!fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence">新建</el-button>
      <el-button type="primary" @click="selectfence" v-if="taskSetting.hasAreaFence && !fenceid&&!openFenceType&&!openSelectTrack&&!openSelectFence&&!openSelectArea">新建</el-button>
      <el-button v-if="fenceid" type="success" @click="checkfence_create(fenceid)">查看</el-button>
      <el-button v-if="fenceid" type="danger" @click="delectefence()">删除</el-button>
    </el-form-item>

      <el-select v-model="selectfence_way" v-if="openFenceType" placeholder="请选择新建方式" style="margin-bottom:20px">
        <el-option v-if="ruleForm.area[0]==0"  label="按区段生成" value="1"></el-option>
        <el-option label="自由画定" value="2"></el-option>
        <el-option label="按区域生成" value="3"></el-option>
      </el-select>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="choose_select_way">下一步</el-button>
      <el-button style="margin-bottom:20px" v-if="openFenceType" @click="openFenceType=false">取消</el-button>
      
      <el-select v-model="selectFenceType" v-if="openSelectTrack" placeholder="请选择围栏类型" style="margin-bottom:20px">
        <el-option label="封闭围栏" value="1"></el-option>
        <el-option label="开放围栏" value="2"></el-option>
      </el-select>
      <el-button type="success" @click="selectFenceGenerate(4)" v-if="openSelectTrack&&selectFenceType" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectTrack=false" v-if="openSelectTrack" style="margin-bottom:20px">取消</el-button>
      <el-select v-model="selectFenceArea" v-if="openSelectArea" placeholder="请选择围栏区域" style="margin-bottom:20px">
        <el-option v-for="(item,index) in workAreaFenceMap" :key="index" :label="index" :value="item"></el-option>
      </el-select>
      <el-button type="success" @click="selectfence_fenceArea_create" v-if="openSelectArea&&selectFenceArea" style="margin-bottom:20px">生成</el-button>
      <el-button type="success" @click="openSelectArea=false" v-if="openSelectArea" style="margin-bottom:20px">取消</el-button>
    <selectfence style="word-break: keep-all;"   v-if="openSelectFence" ref="selectfence"/>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="联络员: " prop="liaison">
      <el-cascader 
    v-model="ruleForm.liaison"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="防护员: " prop="safeman">
      <el-cascader 
    v-model="ruleForm.safeman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="worker">
      <el-cascader 
    v-model="ruleForm.worker"
    :options="person_options_2"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="one_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" @click="createTask1()">完 成</el-button>
  </div>
</div>

<div v-if="choosed==='five'">
  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_three">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="任务名称   " prop="taskName">
          <el-input type="textarea" :rows="1" placeholder="请输入任务名称" v-model="ruleForm.taskName"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="计划开始时间" :label-width="formLabelWidth"  prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
      </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="自动开始   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoStart"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="自动结束   " v-if="taskSetting.autoTimeControl">
      <el-switch
        v-model="autoEnd"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </el-form-item>
    <el-form-item label="提前开始: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="aheadTime" placeholder="请选择提前开始时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="延后结束: " v-if="taskSetting.autoTimeControl">
      <el-select clearable v-model="delayTime" placeholder="请选择延后结束时间" style="margin-bottom:20px">
        <el-option label="5分钟" value="1"></el-option>
        <el-option label="10分钟" value="2"></el-option>
        <el-option label="15分钟" value="3"></el-option>
        <el-option label="20分钟" value="4"></el-option>
        <el-option label="25分钟" value="5"></el-option>
        <el-option label="30分钟" value="6"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="所属部门:" prop="org" v-if="taskSetting.setOrg">
      <el-cascader style="width:302px" v-model="ruleForm.org" :options="orgOptions" :props="orgProps" ref="tree"> </el-cascader>
    </el-form-item>
    <el-form-item label="作业车站: " prop="stationNo" v-if="taskSetting.setStation">
      <el-cascader 
      style="width:302px"
      v-model="ruleForm.stationNo"
      :options="stationNameList"
      :props="{ expandTrigger: 'hover' }"
      filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="商检地点: "  prop="area" filterable>
      <el-cascader 
    v-model="ruleForm.area"
    style="width:302px"
    :options="station_lists_1"
    :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:false }"
    @change="autoCreateFence=true"
    filterable></el-cascader>
    </el-form-item>
    <el-form-item v-if="taskSetting.hasFence" label="点击生成作业区域: ">
      <el-button type="success" @click="selectfence_traincheck">生成</el-button>
      <el-input type="textarea"  v-model="fenceid" :disabled="true" style="width: 10%;height: 80%;" ></el-input>
    </el-form-item>
    <el-form-item v-if="!taskSetting.hasWorkArea" label="商检地点   ">
          <el-input type="textarea" :rows="1" placeholder="请输入商检地点" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item v-if="taskSetting.hasWorkArea" label="地点描述:   ">
          <el-input type="textarea" :rows="1" placeholder="地点补充说明" v-model="location_supplied_3"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="商检内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入商检内容" v-model="three_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业组长: " prop="workLeader" v-if="taskSetting.haveWorkLeader">
      <el-cascader 
    v-model="ruleForm.workLeader"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item :label="showInformation.managerShowName + ':'" prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="商检员: " prop="trainChecker">
      <el-cascader 
    v-model="ruleForm.trainChecker"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true }"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="three_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" v-if="!autoCreateFence" @click="createTask3">完 成</el-button>
    <el-button type="primary" v-else-if="taskSetting.hasFence" @click="autoCreateFenceDialog=true">完 成</el-button>
    <el-button type="primary" v-else @click="createTask3">完 成</el-button>
  </div>  
</div>
<div v-if="choosed==='eight'">
  <el-form  :model="ruleForm" :rules="rules" ref="ruleForm" key="ruleForm" :disabled="form_two">
    <!-- <el-form-item label="活动名称" :label-width="formLabelWidth">
      <el-input v-model="form.name" autocomplete="off"></el-input>
    </el-form-item> -->
    <el-form-item label="计划开始时间" :label-width="formLabelWidth" prop="date1">
      <el-date-picker
      v-model="ruleForm.date1"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="计划结束时间" :label-width="formLabelWidth" prop="date2">
      <el-date-picker
      v-model="ruleForm.date2"
      type="datetime"
      placeholder="选择日期时间" style="width: 40%;">
    </el-date-picker>
    </el-form-item>
    <el-form-item label="作业地点: ">
      <el-input type="textarea" :rows="4" placeholder="请输入作业地点" v-model="location_supplied_2"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="作业内容: ">
          <el-input type="textarea" :rows="4" placeholder="请输入作业内容" v-model="two_input_1"
            style="width: 40%;" />
    </el-form-item>
    <el-form-item label="负责人: " prop="manager">
      <el-cascader 
    v-model="ruleForm.manager"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="作业人员: " prop="petrolman">
      <el-cascader 
    v-model="ruleForm.petrolman"
    :options="person_options"        :key="resetoptions"
    :props="{ expandTrigger: 'hover',multiple:true}"
    
    filterable></el-cascader>
    </el-form-item>
    <el-form-item label="备注   ">
          <el-input type="textarea" :rows="4" placeholder="请输入备注内容" v-model="two_input_2"
            style="width: 40%;" />
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="choosed='select'">上一步</el-button>
    <el-button type="primary" @click="createTask2">完 成</el-button>
  </div>
</div>
</el-dialog>




  <el-table
  @filter-change="filterChange"
  :header-cell-style="{color:'white'}"
    :data="tableData"
    :default-sort = "{prop: 'taskid', order: 'descending'}"
    border
    style="color:white;width: 100%">
    <el-table-column
      fixed
      prop="taskid"
      label="任务编号"
      sortable
      width="120">
    </el-table-column>
    <el-table-column
      prop="type"
      label="类型"
      sortable
      width="120">
    </el-table-column>
    <el-table-column
      prop="taskName"
      label="任务名称"
      sortable
      width="120">
    </el-table-column>
    <el-table-column
      prop="beginTime_plan,endTime_plan"
      label="计划起止时间"
      width="320">
      <template slot-scope="scope">
        {{ scope.row.beginTime_plan}}——{{ scope.row.endTime_plan}}
      </template>
    </el-table-column>
    <el-table-column
      prop="beginTime,endTime,terminalTime"
      label="起止时间"
      width="360">
      <template slot-scope="scope">
        <span v-if="!taskSetting.haveEvacuateState">{{ scope.row.beginTime}}——{{ scope.row.endTime}}</span>
        <span v-else-if="(scope.row.beginTime=='---' && scope.row.beginTime_order!='---') && (scope.row.terminateTime=='---' && scope.row.terminateTime_order!='---')">{{ scope.row.beginTime_order}}(预)——{{ scope.row.terminateTime_order}}(预)</span>
        <span v-else-if="(scope.row.beginTime=='---' && scope.row.beginTime_order!='---')">{{ scope.row.beginTime_order}}(预)——{{ scope.row.terminateTime}}</span>
        <span v-else-if="(scope.row.terminateTime=='---' && scope.row.terminateTime_order!='---')">{{ scope.row.beginTime}}——{{ scope.row.terminateTime_order}}(预)</span>
        <span v-else>{{ scope.row.beginTime}}——{{ scope.row.terminateTime}}</span>
      </template>
    </el-table-column>
    <el-table-column
      v-if="taskSetting.hasManualWarn"
      fixed="right"
      label="人工预警"
      width="100">
      <template slot-scope="scope">
        <el-button :disabled="scope.row.state=='ended' || scope.row.state=='startTask' || !permission.operate || !permission.operate.manualWarn" type="success" size="small" v-if="(!scope.row.manualWarnId)" @click="checkManualWarn(scope.row.type,scope.row.taskid,scope.row.manualWarnId)">开始</el-button>
        <el-button type="warning" size="small" v-else-if="scope.row.manualWarnId" @click="endManualWarn(scope.row.taskid,scope.row.manualWarnId)">结束</el-button>
      </template>
    </el-table-column>
    <el-table-column
      v-if = "taskSetting.hasFence"
      fixed="right"
      label="作业区域"
      width="100">
      <template slot-scope="scope">
        <el-button  @click="checkfence(scope.row.fenceid,scope.row.taskid)" type="success" size="small" :disabled="scope.row.fenceid==null">查看</el-button>
      </template>
    </el-table-column>
    <el-table-column
      fixed="right"
      prop="state"
      label="任务状态"
      column-key="select_state"    
      width="120">
      <template slot-scope="scope">
        <el-tag v-if="scope.row.state=='startTask'" type="warning" effect="dark">已批准</el-tag>
        <el-tag v-else-if="scope.row.state=='endTask'" type="successs" effect="dark">进行中</el-tag>
        <el-tag v-else-if="taskSetting.haveEvacuateState && scope.row.state=='terminateTask'" type="successs" effect="dark">撤离中</el-tag>
        <el-tag v-else-if="taskSetting.haveEvacuateState" type="info" effect="dark">已终止</el-tag>
        <el-tag v-else-if="!taskSetting.haveEvacuateState" type="info" effect="dark">已完成</el-tag>
        <!-- <el-switch
          v-model="scope.row.state"
          @change="updateState(scope.row.taskid,scope.row.state)"
          active-value="endTask"
          inactive-value="startTask"
          active-text="开启"
          inactive-text="关闭">
        </el-switch> -->
      </template>
    </el-table-column>
    <el-table-column
      fixed="right"
      prop="state"
      label="任务变更"
      column-key="select_state"
      width="150">
      <template slot-scope="scope">
      <el-button :disabled="permission.operate!=1 && (!permission.operate || !permission.operate.start)" v-if="scope.row.state=='startTask'&&scope.row.type!='调车作业'&&scope.row.type!='机务作业'" @click="updateState(scope.row.taskid,scope.row.state)" type="warning" size="small">开启任务</el-button>
      <el-button :disabled="permission.operate!=1 && (!permission.operate || !permission.operate.end)" v-if="scope.row.state=='endTask'" @click="updateState(scope.row.taskid,scope.row.state)" type="danger" size="small">结束任务</el-button>
      <el-button :disabled="permission.operate!=1 && (!permission.operate || !permission.operate.terminate)" v-if="taskSetting.haveEvacuateState && scope.row.state=='terminateTask'" @click="updateState(scope.row.taskid,scope.row.state)" type="danger" size="small">终止任务</el-button>
        </template>
      </el-table-column>
    <el-table-column
      fixed="right"
      label="查看图片"
      width="100">
      <template slot-scope="scope">
        <!-- <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button> -->
        <el-button :disabled="scope.row.picture_exist!='true'" :key="scope.row.picture_exist" @click="viewpicture(scope.row.taskid)" type="primary" size="small">查看</el-button>
        <!-- <el-image  v-for="(item,index) in picFileList[(scope.row.taskid)]" :key="index" :src="item" :preview-src-list="getPreviewImgList(index,picFileList[(scope.row.taskid)])">获取成功</el-image> -->
      </template>
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      width="400">
      <template slot-scope="scope">
        <!-- <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button> -->
        <el-button :disabled="permission.view!=1 && (!permission.view || !permission.view.detail)" @click="ClickCheck(scope.row.taskid)" type="warning" size="small">查看</el-button>
        <el-button :disabled="!permission.update" v-if="scope.row.state=='startTask'" @click="ClickEdit(scope.row.taskid,scope.row.state)" type="primary" size="small">修改</el-button>
        <el-button :disabled="!permission.update" v-if="taskSetting.haveEvacuateState && (scope.row.state=='endTask' || scope.row.state=='terminateTask')" @click="ClickEditTime(scope.row.taskid,scope.row.endTime_plan)" type="primary" size="small">修改</el-button>
        <el-button :disabled="!permission.delete" v-if="scope.row.state=='startTask'" @click="ClickDelete(scope.row.taskid,scope.row.state)" type="danger" size="small">删除</el-button>
        <el-button :disabled="!permission.create" @click="ClickEdit(scope.row.taskid, scope.row.state, 1)" type="primary" size="small">复制</el-button>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination background layout="total, sizes, prev, pager, next" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :page-size="pagesize" :page-sizes="[10, 40, 100, 200, 500]"
            :total="tableData_length" :current-page="currentPage" align="center">
  </el-pagination>

  <el-dialog title="查看图片" :visible.sync="checkpicture">
    <span v-if="picture_length==false">当前任务未上传图片</span>
    <el-image style="margin-left:20px;margin-bottom:10px;width:100px;height:150px" v-for="(item,index) in picFileList[(checkpicture_taskid)]" :key="index" :src="item" :preview-src-list="getPreviewImgList(index,picFileList[(checkpicture_taskid)])"></el-image>
  </el-dialog>

  <el-dialog title="人工预警" :visible.sync="manualWarnState" :close-on-click-modal ="false">
    <el-form>
    <el-form-item label="预警人员: ">
      <el-select multiple v-if="!checkManualWarnId" v-model="manualWarn" placeholder="请选择预警人员类型" style="margin-bottom:20px">
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.GWShowName" label="防护员" value="safeman"></el-option>
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.GWShowName" label="作业人员" value="worker"></el-option>
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.GWShowName" label="联络员" value="liaison"></el-option>
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.DWShowName" label="防护员" value="safeman"></el-option>
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.DWShowName" label="作业人员" value="worker"></el-option>
        <el-option v-if="checkManualWarn_taskType==taskSetting.showInformation.DWShowName" label="联络员" value="liaison"></el-option>
        <el-option :label=showInformation.managerShowName value="manager"></el-option>
        <el-option v-if="checkManualWarn_taskType=='列检作业'" label="列检员" value="trainChecker"></el-option>
        <el-option v-if="checkManualWarn_taskType=='商检作业'" label="商检员" value="trainChecker"></el-option>
        <el-option v-if="checkManualWarn_taskType=='巡道作业'" label="巡道员" value="petrolman"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="预警内容: ">
      <el-input type="textarea" :rows="1" placeholder="请输入人工预警内容" v-model="manWarnContent"
            style="width: 40%;" />
    </el-form-item>
    <el-button type="success" v-if="(!checkManualWarnId) && manualWarn!=''" @click="createManualWarn(checkManualWarn_taskid,manWarnContent)">开始</el-button>
    </el-form>
  </el-dialog>




    
    <!-- <div v-if="1 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="globalEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterglobalEventChange">
        <el-table-column prop="appearTime" align="center" width="180" label="发生时间" :sortable="true" />
        <el-table-column prop="deviceId" align="center" width="180" label="设备ID" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="descrption" align="center" label="事件描述" />
      </el-table>
    </div>

    <div v-if="2 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="singleEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterSingleEventChange">
        <el-table-column prop="appearTime" align="center" label="发生时间" width="180" :sortable="true" />
        <el-table-column prop="deviceId" align="center" width="180" label="设备ID" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="eventType" align="center" label="事件类型" />
        <el-table-column prop="eventReason" align="center" label="事件原因" />
      </el-table>
    </div>

    <div v-if="3 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="singleEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterSingleEventChange">
        <el-table-column prop="appearTime" align="center" label="发生时间" width="180" :sortable="true" />
        <el-table-column prop="deviceId" align="center" label="设备ID" width="180" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="eventType" align="center" label="事件类型" />
        <el-table-column prop="eventReason" align="center" label="事件原因" />
      </el-table>
    </div>

    <div v-if="4 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="singleEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterSingleEventChange">
        <el-table-column prop="appearTime" align="center" label="发生时间" width="180" :sortable="true" />
        <el-table-column prop="deviceId" align="center" label="设备ID" width="180" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="statusBeforeChanged" align="center" label="变更前定位状态" />
        <el-table-column prop="statusAfterChanged" align="center" label="变更后定位状态" />
      </el-table>
    </div>

    <div v-if="5 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="singleEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterSingleEventChange">
        <el-table-column prop="appearTime" align="center" label="发生时间" width="180" :sortable="true" />
        <el-table-column prop="deviceId" align="center" label="设备ID" width="180" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="preWarnsNumBeforeChanged" align="center" label="变更前预警目标点个数" />
        <el-table-column prop="preWarnsNumAfterChanged" align="center" label="变更后预警目标点个数" />
      </el-table>
    </div>

    <div v-if="6 === this.queryData.eventId">
      <el-table v-loading="loading"
        :data="singleEventTableData.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
        :default-sort="{ prop: 'appearTime', order: 'descending' }" style="width: 100%" ref='refsTable'
        :height="tableHeight" @filter-change="filterSingleEventChange">
        <el-table-column prop="appearTime" align="center" label="发生时间" width="180" :sortable="true" />
        <el-table-column prop="deviceId" align="center" label="设备ID" width="180" />
        <el-table-column prop="deviceType" align="center" width="180" label="设备类型" :filters="filters"
          :filter-multiple="false" column-key="deviceType" />
        <el-table-column prop="fence_id" align="center" label="围栏ID" />
        <el-table-column prop="fenceRelationBeforeChanged" align="center" label="变更前与围栏关系" />
        <el-table-column prop="fenceRelationAfterChanged" align="center" label="变更后与围栏关系" />
      </el-table>
    </div> -->

    <!-- <el-pagination background layout="total, sizes, prev, pager, next" @size-change="handleSizeChange"
      @current-change="handleCurrentChange" :page-size="pagesize" :page-sizes="[20, 40, 100, 200, 500]"
      :total="totalDataLength" align="center">
    </el-pagination> -->
  </div>
</template>
<script>
import script from './script'
export default script
</script>
<style lang="scss" scoped>
@import './style.scss';
</style>


